package server;

/**
 * @author xsl
 * @date 2021/2/20 21:27
 * @Description: Mapper
 */
public class Mapper {

    protected abstract static class MapElement<T> {
        public final String name;
        public final T object;

        public MapElement(String name, T object) {
            this.name = name;
            this.object = object;
        }
    }
    protected static final class MappedHost extends MapElement<ContextList> {

        public MappedHost(String name, ContextList object) {
            super(name, object);
        }
    }

    protected static final class ContextList {

        public final MappedContext[] contexts;

        public ContextList(MappedContext[] contexts) {
            this.contexts = contexts;
        }

    }

    protected static final class MappedContext extends MapElement<MappedWrapper[]> {
        public MappedContext(String name, MappedWrapper[] object) {
            super(name, object);
        }
    }

    protected static class MappedWrapper extends MapElement<Wrapper> {

        public MappedWrapper(String name, Wrapper wrapper) {
            super(name, wrapper);
        }
    }
}
